import http from "@/utils/http"
/**
 * @description: 获取地址列表
 * @return {*}
 */
export function getAddressList() {
  return http.get("/address")
}

/**地址，实现数据回显
 * @description:
 * @param {*} id
 * @return {*}
 */
export function getAddressDetail(id) {
  return http.get("/address/" + id)
}

/**
 * @description: 编辑地址
 * @param {*} obj
 * @return {*}
 */
export function updateAddress(obj) {
  return http.put("/address", obj)
}

/**
 * @description: 新增地址
 * @param {*} obj
 * @return {*}
 */
export function addAddress(obj) {
  return http.post("/address", obj)
}

/**
 * @description: 删除地址
 * @param {*} id
 * @return {*}
 */
export function removeAddress(id) {
  return http.delete("/address/" + id)
}
